<#macro html title="" keywords="" description="">
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- 使用动态SEO信息 -->
    <#list site as config>
        <#if config.configKey == "site_name">
            <title>${pageTitle!title} - ${config.configValue!}</title>
        </#if>
        <#if config.configKey == "site_keywords">
            <meta name="keywords" content="${config.configValue!keywords}">
        </#if>
        <#if config.configKey == "site_description">
            <meta name="description" content="${config.configValue!description}">
        </#if>
    </#list>
    
    <!-- 其他头部内容 -->
    <link rel="shortcut icon" href="${site[0].config_value!}" data-key="site_favicon">
    <link rel="stylesheet" href="/static/css/style.css">
    <!-- 自定义HEAD -->
    <#list site as config>
        <#if config.config_key == "custom_head">
            ${config.config_value!}
        </#if>
    </#list>
</head>
<body>
<!-- 头部 -->
<#include "/base/header.html">

<!-- 内容区 -->
<div class="container">
    <#if templateMapping?? && request.requestUri?has_content>
        <#assign path = request.requestUri?substring(1)>
        <#if templateMapping[path]??>
            <#include templateMapping[path]>
        <#else>
            <#nested>
        </#if>
    <#else>
        <#nested>
    </#if>
</div>

<!-- 底部 -->
<#include "footer.html">

<!-- 统计代码 -->
${site[0].statisticsCode!}
<!-- 自定义FOOT -->
${site[0].customFoot!}
</body>
</html>
</#macro>
